﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern19备忘录模式.Models
{
    public class Manager
    {
        private Memo Memo { get; set; }
        public void Backup(GameState state)
        {
            Console.WriteLine("管理者正在备份游戏状态 ...");
            Memo = state.Create();
        }

        public void Restore(GameState state) 
        {
            Console.WriteLine("管理者已还原游戏状态 ...");
            state.Restore(Memo);
        }
    }
}
